//
//  OSVerticalButton.m
//  百思不得姐
//
//  Created by PushMeBaby on 16/2/24.
//  Copyright © 2016年 CoderC. All rights reserved.
//

#import "OSVerticalButton.h"

@implementation OSVerticalButton

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(void)awakeFromNib{
    self.titleLabel.textAlignment = NSTextAlignmentCenter;


}

-(void)layoutSubviews{
    [super layoutSubviews];
    
    self.imageView.x = 0;
    self.imageView.y = 0;
    self.imageView.width = self.width;
    self.imageView.height = self.width;
    
    
    self.titleLabel.x = 0;
    self.titleLabel.y = self.imageView.width;
    self.titleLabel.width = self.width;
    self.titleLabel.height = self.height - self.titleLabel.y;
    
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}


@end
